package o;

import android.content.Context;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;

public class blu {
    public static String ˎ(long j) {
        long j2 = 60 * 1000;
        long j3 = 60 * j2;
        int i = (int) (j / j3);
        j3 = j % j3;
        int i2 = (int) (j3 / j2);
        int i3 = (int) ((j3 % j2) / 1000);
        Object obj = "";
        if (i > 0) {
            obj = String.valueOf(i);
        }
        String valueOf = String.valueOf(i2);
        if (i2 < 10) {
            valueOf = "0" + valueOf;
        }
        String valueOf2 = String.valueOf(i3);
        if (i3 < 10) {
            valueOf2 = "0" + valueOf2;
        }
        StringBuffer stringBuffer = new StringBuffer();
        if (!TextUtils.isEmpty(obj)) {
            stringBuffer.append(obj).append(":");
        }
        stringBuffer.append(valueOf).append(":").append(valueOf2);
        return stringBuffer.toString();
    }

    public static DisplayMetrics ˎ(Context context) {
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        if (windowManager != null) {
            Display defaultDisplay = windowManager.getDefaultDisplay();
            if (defaultDisplay != null) {
                DisplayMetrics displayMetrics = new DisplayMetrics();
                defaultDisplay.getRealMetrics(displayMetrics);
                return displayMetrics;
            }
        }
        return null;
    }
}
